<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function zhisu(a) {
            for (var i = 2; i < a; i++) {
                if (a % i === 0) {
                    alert(a + '不是一个质数')
                    return
                }
            }
            alert(a + '是一个质数')
        }
        zhisu(prompt())
    </script>
</body>

</html>